import logo from '../../../../assets/images/logo.png'
import type { RootState } from '../../../../store'
import { useSelector } from 'react-redux'

const Logo = () => {
  const { isCollapse } = useSelector((state: RootState) => state.menu)
  const title = import.meta.env.VITE_GLOB_APP_TITLE

  return (
    <div className="logo-box">
      <img src={logo} className="logo-img" alt="logo" />
      {!isCollapse ? <h2 className="logo-text">{title}</h2> : null}
    </div>
  )
}

export default Logo